/*
To change this template, choose Tools | Templates and open the template in the editor.
*/
package package01;
/*
@author Gabriel
*/
import java.sql.Connection;
import java.sql.DriverManager;

public class Conexão {
    public static Connection getConnection(String user, String pass) throws Exception{
        Class.forName("oracle.jdbc.OracleDriver");              //Intrução que carrega Driver JDBC.
        String url = "jdbc:oracle:thin:@localhost:1521:XE";     //String que lê a url do banco de dados.
        return DriverManager.getConnection(url, user, pass);    //retorna a conexão, com base na leitura da URL, SENHA, PASSE.
    }    
}